function drawAgePersonalityChart(){
  var _differentAge = echarts.init(document.getElementById('agePersonalityChart'));
  const names = [];
   d3.csv("国内人格数据.csv",function(error,data) {
    option = {
      tooltip: {
        trigger: 'axis'
      },
      color: ['#67ADB7', '#E4A6BD', '#F3D8E1', '#789262', '#ABC8CC'],
      legend: {
        data: ['神经性', '外倾性', '开放性', '宜人性', '尽责性'],
        show: true,
        icon: 'circle',
        y: 'center',
        right: 20,
        textStyle: {
          color: '#000'
        },
        orient: 'vertical'
      },
      grid: {
        top: '2%',
        left: '3%',
        right: '20%',
        bottom: '10%',
        containLabel: true
      },
      toolbox: {
        feature: {
          saveAsImage: {}
        }
      },
      xAxis: {
        type: 'category',
        boundaryGap: false,
        data: ['20岁以下', '20岁到29岁', '30岁到39岁', '40岁到49岁', '50岁到59岁', '60岁以上']
      },
      yAxis: {
        type: 'value',
        min: 2.1
      },
      series: [
        {
          name: '神经性',
          type: 'line',
          data: [ 2.93,  2.90, 2.80, 2.66, 2.46, 2.71]
        },
        {
          name: '外倾性',
          type: 'line',
          data: [ 3.21,  3.17, 3.26, 3.35, 3.38, 3.20]
        },
        {
          name: '开放性',
          type: 'line',
          data: [ 3.36,  3.30, 3.17, 3.17, 3.18, 3.01]
        },
        {
          name: '宜人性',
          type: 'line',
          data: [ 3.59,  3.58, 3.64, 3.76, 3.79, 3.72]
        },
        {
          name: '尽责性',
          type: 'line',
          data: [ 3.16,  3.26, 3.38, 3.60, 3.54, 3.57]
        }
      ]
    };
      // 设置图表选项
      _differentAge.setOption(option);
  });
};

